#include <cstdio>
#include "DxManager.h"

#ifndef GRID_H
#define GRID_H

#include "Tetrimino.h"
#include "Common.h"

#define GRID_PX 15
#define GRID_PY 2
#define GRID_SX 10
#define GRID_SY 20

class Grid
{
private:
	T_Block** G_Space;
	int PosX;
	int PosY;
	int SizeX;
	int SizeY;
	DxManager * dxm;
	void Init();
public:
	Grid(DxManager * dxmanager);
	~Grid();
	void DrawOutline();
	void DrawGrid();
	void Clr_Grid();
	bool getOcc(int x, int y) 
	{ 
		if(&G_Space[y][x])
			return G_Space[y][x].GetOccupation(); 
		return true;
	}
	bool StopTetri(int,int,Tetrimino);
	int FullRow();
	void ClearRow(int);
	bool ClearBlock(int,int);
};

#endif